#ifndef INFINITY_INVENTAIRE_H
#	define INFINITY_INVENTAIRE_H

#include "graphics/renderer.h"
#include "graphics/indexbuffer.h"
#include "graphics.opengl/vertexbuffer.h"

#include "container.h"
#include "widget.h"
#include "imagebox.h"

#define NBSLOT_INV 30
#define COLUMN 10
#define ROW 3
#define DIMENSIONSLOT_INV 40
#define OFFSETSLOT_INV 5

namespace infinity {
	namespace render {

class Inventaire
{
public : //! @name Construction & Destruction
	//! @{
	Inventaire(Container * container);
	virtual ~Inventaire();
	//! @}

public : //! @name Commands
	//! @{
	void initializeGUI();
	void updateGUI();

	inline dw::graphics::VertexBuffer* getVertexBuffer() { return m_vertexBuffer; }
	inline dw::graphics::IndexBuffer* getIndexBuffer() { return m_indexBuffer; }
	inline dw::uint32 getTrianglesCount() { return m_trianglesCount; }
	//!@}

protected :
	void createMesh();
	void updateBuffer();

protected : // @name Data
	//! @{
	dw::graphics::VertexFormat* m_vertexFormat;
	dw::graphics::IndexBuffer* m_indexBuffer;
	dw::graphics::VertexBuffer* m_vertexBuffer;

	Widget* m_root;
	ImageBox m_imagesBoxes[NBSLOT_INV];
	ImageBox m_backText;

	Container * m_container;

	dw::uint32 m_trianglesCount;
	//! @}
};

	} // namespace render
} // namespace infinity

#endif // !INFINITY_INVENTAIRE_H
